package com.csust.automaticteach.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.csust.automaticteach.model.dto.knowledgegraph.KnowledgeGraphAddRequest;
import com.csust.automaticteach.model.dto.knowledgegraph.KnowledgeGraphQueryRequest;
import com.csust.automaticteach.model.dto.knowledgegraph.response.GraphOption;
import com.csust.automaticteach.model.entity.KnowledgeGraph;
import com.baomidou.mybatisplus.extension.service.IService;
import com.csust.automaticteach.model.entity.User;
import com.csust.automaticteach.model.vo.knowledgegraph.KnowledgeGraphVO;

import java.util.List;

/**
* @author 钰玟
* @description 针对表【t_knowledge_graph(知识图谱表)】的数据库操作Service
* @createDate 2025-07-19 12:26:44
*/
public interface KnowledgeGraphService extends IService<KnowledgeGraph> {
    /**
     * 生成知识图谱
     * @param knowledgeGraphAddRequest 生成知识图谱参数
     * @param loginUser 登录用户
     * @return 生成结果
     */
    Boolean generateKnowledgeGraph(KnowledgeGraphAddRequest knowledgeGraphAddRequest, User loginUser);

    /**
     * 获取知识图谱查询条件
     * @param knowledgeGraphQueryRequest 查询条件
     * @return 查询条件
     */
    QueryWrapper<KnowledgeGraph> getKnowledgeGraphQueryWrapper(KnowledgeGraphQueryRequest knowledgeGraphQueryRequest);
    /**
     * 获取知识图谱vo
     * @param record 实体类
     * @return vo
     */
    KnowledgeGraphVO getKnowledgeGraphVO(KnowledgeGraph record);
    /**
     * 获取知识图谱列表vo
     * @param records 实体类
     * @return vo列表
     */
    List<KnowledgeGraphVO> getKnowledgeGraphVOList(List<KnowledgeGraph> records);


    /**
     *
     * @param content
     * @return
     */
    GraphOption parseContent(String content);
}
